<?php $this->load->view('admin/public/head.html', array('css' => array(
'/assets/admin/css/admin/common.css'
))); ?>
<script>
    var pageType = '';
    var attach = {};
</script>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper" ng-controller="admin-cashout-list-controller">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            资金管理
            <small>用户资金流管理模块</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 后台首页</a></li>
            <li class="active">提现列表</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <!-- Custom Tabs -->
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li ng-repeat="m in menus" ng-click="select(m.alias)" ng-class="{'active': m.alias == nowType}">
                            <a href="javascript:void(0);" ng-bind="m.text"></a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab_1">
                            <div class="box">
                                <div class="box-body no-padding">
                                    <table class="table table-striped">
                                        <tr>
                                            <th class="text-center" style="width: 50px">#</th>
                                            <th>用户名称</th>
                                            <th class="text-center">提现金额</th>
                                            <th class="text-center">申请时间</th>
                                            <th class="text-center">处理时间</th>
                                            <th class="text-center">处理人员</th>
                                            <th class="text-center">来源</th>
                                            <th class="text-center">状态</th>
                                            <th class="text-center" style="width: 120px">操作</th>
                                        </tr>
                                        <tr ng-repeat="(index, c) in cashoutLists">
                                            <td class="text-center" ng-bind="c.id"></td>
                                            <td>
                                                <a href="javascript:;" ng-bind="c.nickName"></a>
                                            </td>
                                            <td class="text-center" style="color: red;" ng-bind="'￥' + c.amount_cny"></td>
                                            <td class="text-center" ng-bind="c.created"></td>
                                            <td class="text-center" ng-bind="c.checked ? c.checked : '--'"></td>
                                            <td class="text-center" ng-bind="c.admin ? c.admin : '--'"></td>
                                            <td class="text-center" ng-bind="sources[c.source]"></td>
                                            <td class="text-center" nb-bind="c.status">
                                                <span ng-if="c.status == 6" class="badge bg-green">已通过</span>
                                                <span ng-if="c.status == 2" class="badge bg-red">已驳回</span>
                                                <span ng-if="c.status == 0" class="badge bg-aqua">等待处理</span>
                                                <span ng-if="c.status == 5" class="badge bg-navy">处理失败</span>
                                            </td>
                                            <td class="text-center">
                                                <a href="javascript:void(0);" class="btn btn-link btn-xs" ng-click="c.status == 0 && pass(index)" ng-class="{'gu-forbidden-click': c.status > 0}"><i class="fa fa-thumbs-up"></i>通过</a>
                                                <a href="javascript:void(0);" class="btn btn-link btn-xs" ng-click="c.status == 0 && reject(index)" ng-class="{'gu-forbidden-click': c.status > 0}"><i class="fa fa-thumbs-down"></i>驳回</a>
                                            </td>
                                        </tr>
                                        <tr ng-if="cashoutLists.length == 0">
                                            <td colspan="9" class="text-center">
                                                <p class="help-block">暂无记录</p>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <!-- /.box-body -->
                                <div class="box-footer text-center">
                                    <a href="javascript:void(0);" ng-show="nextPage" ng-click="loadMore()">加载更多</a>
                                </div>
                            </div>
                            <!-- /.box -->
                        </div>
                    </div>
                    <!-- /.tab-content -->
                </div>
                <!-- nav-tabs-custom -->

            </div>
        </div>
    </section>
    <!-- /.content -->

    <!-- 模态框 -->
    <div class="modal fade" id="testModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">驳回意见</h4>
                </div>
                <div class="modal-body">

                    <div class="row">
                        <div class="col-md-12">
                            <!-- form start -->
                            <form class="form-horizontal">
                                <div class="box-body">
                                    <div class="form-group">
                                        <textarea class="form-control" ng-model="rejectRemark" rows="5" placeholder="请填写驳回理由..."></textarea>
                                    </div>
                                </div>
                                <!-- /.box-body -->
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" ng-click="doReject(selectRejectIndex)">确认驳回</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
</div>
<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array(
    'js' => array(
        '/assets/admin/js/bbs/index.js',
        '/assets/admin/js/money/cashout_list.js'
    )
)); ?>
